@extends('company.company')

@section('title','企业中心')

@section('rightcontainer')
@include('front.common.editor')
<div class="col-xs-10" style="padding-right: 0;">
    <div id="info_block" class="bord-1 font-16 backgr-color-white">
        <div class="color-1 padd-15 boderbottom">试卷信息编辑</div>
        <div class="form company-form company-center-form">
            <form id="examForm">
              <div class="form-group clearfix">
                <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">试卷名称：</div>
                <div class="col-sm-9 col-xs-12"> 
                    <input type="text" class="form-control" name="name" value="{{!empty($result)?$result->name:''}}">
                </div>
              </div>
              <div class="form-group clearfix">
                <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">分数线：</div>
                <div class="col-sm-9 col-xs-12">
                    <input type="number" class="form-control" name="score_limit" value="{{!empty($result)?$result->score_limit:''}}">
                    <div class="help-block">低于改分数，则不允许投递简历！</div>
                </div>
              </div>
              <div class="form-group clearfix">
                    <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">试题分值:</div>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" name="score" placeholder="试题分值" value="{{ !empty($result)?$result->score:1 }}">
                        <div class="help-block">试卷中每一题的分值，必填项</div>
                    </div>
              </div>
              <div class="form-group clearfix">
                    <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">考试时间:</div>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" name="times" placeholder="考试时间" value="{{ !empty($result)?$result->times:0 }}">
                        <div class="help-block">用户考试时间，超过该时间将自动提交考试,为0则为不限制。单位：分钟</div>
                    </div>
              </div>
              <div class="form-group clearfix">
                    <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">选择题目:</div>
                    <div class="col-sm-9">
                         @foreach ($questions as $qt)
                            <label>
                                <input type="checkbox" name="question_id[]" id="" value="{{ $qt->id }}" @if(!empty($selected) && in_array($qt->id,$selected)) checked @endif>
                                &nbsp;&nbsp;&nbsp;&nbsp;{{ $qt->title }}&nbsp;&nbsp;
                            </label>
                        @endforeach
                    </div>
              </div>
              
              {!! csrf_field() !!}
              <input type="hidden" name="id" value="{{ !empty($result)?$result->id:''}}" >
              <div id="jobs-hots-more" class="padd-t-30 ">
                  <button type="button" id="getMoreJobs" class="btn-ok" onclick="saveData('/company/center/exams','examForm','')">发布</button>
                  <button type="button" id="getMoreJobs" class="btn-cance margin-l-15">取消</button>
              </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
$('input').iCheck({
	checkboxClass: 'icheckbox_flat-blue',
    radioClass: 'iradio_flat-blue',
    increaseArea: '-10' // optional
});
var editor;
KindEditor.ready(function(K) {
	editor = K.create('.content', {	
    	resizeType : 1,
    	//allowPreviewEmoticons : false,
    	afterBlur: function () { this.sync(); },
    	allowImageUpload : true,
    	width : "100%", 
    	allowUpload : true,
    	//postParams:123,
    	//uploadJson : '/index.php?g=User&m=Upyun&a=kindedtiropic',
    	items : ["justifyleft", "justifycenter", "justifyright", ]
	});

});

</script>

@stop

<!--底部导航-->
@section('footer')
@parent
@stop

